import java.util.Scanner;
public class Day_02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int one = num % 10;//个位
        int two = num / 10 % 10;//十位
        int three = num / 100 % 10;//百位
        System.out.println(one);
        System.out.println(two);
        System.out.println(three);
    }
}
